/* Copyright (C) 2008  Romolo Camplani, Marco Fortunato, Marco Marelli, Guido Rota, Fabio A. Schreiber et al.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */
/*
 * SensorBoard.java
 *
 * Created on October 25, 2007, 4:56 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package org.dei.perla.utils.emulator.model.node;

import org.dei.perla.utils.emulator.models.meta.Component;
import org.dei.perla.utils.emulator.models.world.SensorWorld;

/**
 *
 * @author Adnan
 */
public class SensorBoard implements Component, AppsoftSensor{

  
    private Battery bOfLocal;
    
    private SensorWorld sw;
    private SensorBattery sb;
    /** Creates a new instance of SensorBoard */
    public SensorBoard() {
    }
    
     public void setReference(Battery bOfNode)
    {
        bOfLocal = bOfNode;
    }
    public void setTemp(double t){sw.setTemp(t);}
    public double getTemp(){return 1.0;}
    
    public void setCharge(double c){
         sb = bOfLocal;
        sb.setCharge(c);
    }
    public String getCharge() 
    {
        sb = bOfLocal;
        return sb.getCharge(); 
    }
}
